package com.blog.Bard.base.dao;

import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import com.blog.Bard.base.pojo.BardDict;
import com.blog.Bard.common.dao.BaseRepository;

public interface BardDictDao extends BaseRepository<BardDict, Integer>{

	/**
	 * 修改更新字典
	 * @param dictCode
	 * @param dictValue
	 * @param dictType
	 * @param desc
	 * @param status
	 * @param seq
	 * @param id
	 * @return
	 * @throws Exception
	 */
	@Modifying
	@Query(nativeQuery = true, value = "update BardDict set dictCode = :dictCode, dictValue=:dictValue, "
			+ "dictType=:dictType,dictDesc=:desc,dictStatus=:status,seq=:seq where id = :id")
	int updateDict(
			@Param("dictCode") String dictCode,
			@Param("dictValue") String dictValue,
			@Param("dictType") String dictType,
			@Param("desc") String desc,
			@Param("status") Integer status,
			@Param("seq") Integer seq,
			@Param("id") Integer id
			) throws Exception;

}
